package br.elsa.survey.domain.questions;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * Implementation of an {@link CheckboxOption} for a {@link ChoiceQuestion}.
 */
@Entity
@Table(name = "checkbox_options", schema = "survey")
@DiscriminatorValue("CHECKBOX_OPTIONS")
public class CheckboxOption extends Option {

	private static final long serialVersionUID = -5847104561838844355L;

	/**
	 * Instance of the question that this option belongs to
	 */
	@ManyToOne
	private CheckboxQuestion question;

	public CheckboxQuestion getQuestion() {
		return question;
	}

	public void setQuestion(CheckboxQuestion question) {
		this.question = question;
	}
}
